home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / blueprnt / bptime.asm < prev    next >
Assembly Source File  |  1989-10-03  |  2KB  |  57 lines

  1. ;**************************************************************
  2. ;* Set Time using Time on Specifed Server                     *
  3. ;* by Craig Chaiken                  (BPTIME.PAS, BPTIME.EXE) *                             *
  4. ;* October 3, 1989                                            *
  5. ;*                                                            *
  6. ;* Function:                                                  *
  7. ;*     This program reads the number of ticks since midnight, *
  8. ;*     a 32 bit number at location 0000:046C, from the        *
  9. ;*     server, and set this client to match.                  *
  10. ;*                                                            *
  11. ;* Command Format:                                            *
  12. ;*     BPTIME /socket_number                                  *
  13. ;*************************************************************)
  14.  
  15. codeseg segment byte
  16.         assume  cs:codeseg,ds:codeseg,es:codeseg
  17.         org     100h
  18. start:  jmp     time
  19. ;
  20. socket_num     db    0
  21.  
  22. time_request    db    'r'
  23. time_addoff    dw    046ch
  24. time_addseg    dw    0000h
  25. time_length    dw    0004h
  26.  
  27. include bpbioshd.mod
  28.         include misc.mod
  29.  
  30. time    proc    near            ;Exit if no Parameters
  31.         mov     al,cs:[80h]
  32.         or      al,al
  33.         jnz     time1
  34.     ret
  35.  
  36. time1:    mov    si,81h
  37.     call    get_opt
  38.     mov    socket_num,cl
  39.  
  40.     put_packet    socket_num,7,offset time_request
  41.     get_packet    socket_num,cx,offset time_request
  42.     push    es
  43.     push    ds
  44.     mov    cx,4
  45.     mov    ax,0
  46.     mov    es,ax
  47.     mov    di,046ch
  48.     mov    si,offset time_request+1
  49.     call    sitoesdi
  50.     pop    ds
  51.     pop    es
  52.     int    20h
  53. time    endp
  54.  
  55. codeseg ends
  56.         end     start
  57.